import request from '@/utils/request'


// 查询根据楼层id获取房间
export function getRoomByFloorId(roomId) {
  return request({
    url: '/park/room/getRoomByFloorId/' + roomId,
    method: 'get',
  })
}

// 查询根据房间获取信息
export function getRoomById(roomId) {
  return request({
    url: '/park/room/getRoomById/' + roomId,
    method: 'get',
  })
}

// 删除房间
export function deleteRoomByid(roomId) {
  return request({
    url: '/park/room/deleteRoomByid/' + roomId,
    method: 'delete',
  })
}

// 添加楼层
export function addRoom(form) {
  return request({
    url: '/park/room/addRoom',
    method: 'post',
    data: form
  })
}

// 修改楼层
export function updateRoom(form) {
  return request({
    url: '/park/room/updateRoom',
    method: 'put',
    data: form
  })
}

// 修改楼层
export function getRoomAll(query) {
  return request({
    url: '/park/room/getRoomAll',
    method: 'get',
    params: query
  })
}
